<script setup>
/*
* 别人的不好用，自己写一个
* */
import {useRoute, useRouter} from "vue-router";

const router = useRouter()
const route = useRoute()
const thisclass=ref([])
const props = defineProps({
  title:{
    type:String,
    default:null,
  },
  round:{
    type:Boolean,
    default:true,
  }
})
</script>

<template>
  <div class="overflow-hidden" :class="{'rounded-md':props.round,}">
    <slot name="header">
      <div v-if="props.title" class="w-full h-8 flex justify-start items-center px-2 py-1">
        <span class="text-2xl font-semibold">{{props.title}}</span>
      </div>
      <div v-if="props.title" class="w-full h-1px my-2 bg-gray-200"></div>
    </slot>
    <slot name="default"></slot>
    <slot name="footer"></slot>
  </div>
</template>


<style scoped>

</style>